<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Formatter::BaseTextFormatter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Formatter::BaseTextFormatter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter_rb.html">
                vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="BaseFormatter.html">
                BaseFormatter
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Baseclass for text-based formatters. Can in fact be used for non-text based
ones too - just ignore the <tt>output</tt> constructor argument.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000501">backtrace_line</a>&nbsp;&nbsp;
      <a href="#M000508">blue</a>&nbsp;&nbsp;
      <a href="#M000497">close</a>&nbsp;&nbsp;
      <a href="#M000502">colour</a>&nbsp;&nbsp;
      <a href="#M000499">colour?</a>&nbsp;&nbsp;
      <a href="#M000494">colourise</a>&nbsp;&nbsp;
      <a href="#M000500">dry_run?</a>&nbsp;&nbsp;
      <a href="#M000493">dump_failure</a>&nbsp;&nbsp;
      <a href="#M000496">dump_pending</a>&nbsp;&nbsp;
      <a href="#M000495">dump_summary</a>&nbsp;&nbsp;
      <a href="#M000492">example_pending</a>&nbsp;&nbsp;
      <a href="#M000498">format_backtrace</a>&nbsp;&nbsp;
      <a href="#M000504">green</a>&nbsp;&nbsp;
      <a href="#M000506">magenta</a>&nbsp;&nbsp;
      <a href="#M000491">new</a>&nbsp;&nbsp;
      <a href="#M000503">output_to_tty?</a>&nbsp;&nbsp;
      <a href="#M000505">red</a>&nbsp;&nbsp;
      <a href="#M000507">yellow</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">output</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">pending_examples</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000491" class="method-detail">
        <a name="M000491"></a>

        <div class="method-heading">
          <a href="#M000491" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(options, where)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a <a href="BaseTextFormatter.html#M000491">new</a> instance that
will write to <tt>where</tt>. If <tt>where</tt> is a <a
href="../../../String.html">String</a>, output will be written to the File
with that name, otherwise <tt>where</tt> is exected to be an IO (or an
object that responds to puts and write).
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000491-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000491-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 14</span>
14:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">where</span>)
15:           <span class="ruby-keyword kw">super</span>
16:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">where</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
17:             <span class="ruby-ivar">@output</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">where</span>, <span class="ruby-value str">'w'</span>)
18:           <span class="ruby-keyword kw">else</span>
19:             <span class="ruby-ivar">@output</span> = <span class="ruby-identifier">where</span>
20:           <span class="ruby-keyword kw">end</span>
21:           <span class="ruby-ivar">@pending_examples</span> = []
22:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000497" class="method-detail">
        <a name="M000497"></a>

        <div class="method-heading">
          <a href="#M000497" class="method-signature">
          <span class="method-name">close</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000497-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000497-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 79</span>
79:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
80:           <span class="ruby-keyword kw">if</span> <span class="ruby-constant">IO</span> <span class="ruby-operator">===</span> <span class="ruby-ivar">@output</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@output</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">$stdout</span>
81:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">close</span> 
82:           <span class="ruby-keyword kw">end</span>
83:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000494" class="method-detail">
        <a name="M000494"></a>

        <div class="method-heading">
          <a href="#M000494" class="method-signature">
          <span class="method-name">colourise</span><span class="method-args">(s, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000494-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000494-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 36</span>
36:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colourise</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">failure</span>)
37:           <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">failure</span>.<span class="ruby-identifier">expectation_not_met?</span>)
38:             <span class="ruby-identifier">red</span>(<span class="ruby-identifier">s</span>)
39:           <span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">failure</span>.<span class="ruby-identifier">pending_fixed?</span>)
40:             <span class="ruby-identifier">blue</span>(<span class="ruby-identifier">s</span>)
41:           <span class="ruby-keyword kw">else</span>
42:             <span class="ruby-identifier">magenta</span>(<span class="ruby-identifier">s</span>)
43:           <span class="ruby-keyword kw">end</span>
44:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000493" class="method-detail">
        <a name="M000493"></a>

        <div class="method-heading">
          <a href="#M000493" class="method-signature">
          <span class="method-name">dump_failure</span><span class="method-args">(counter, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000493-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000493-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 28</span>
28:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_failure</span>(<span class="ruby-identifier">counter</span>, <span class="ruby-identifier">failure</span>)
29:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
30:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{counter.to_s})&quot;</span>
31:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">colourise</span>(<span class="ruby-node">&quot;#{failure.header}\n#{failure.exception.message}&quot;</span>, <span class="ruby-identifier">failure</span>)
32:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">format_backtrace</span>(<span class="ruby-identifier">failure</span>.<span class="ruby-identifier">exception</span>.<span class="ruby-identifier">backtrace</span>)
33:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
34:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000496" class="method-detail">
        <a name="M000496"></a>

        <div class="method-heading">
          <a href="#M000496" class="method-signature">
          <span class="method-name">dump_pending</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000496-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000496-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 67</span>
67:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_pending</span>
68:           <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@pending_examples</span>.<span class="ruby-identifier">empty?</span>
69:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
70:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Pending:&quot;</span>
71:             <span class="ruby-ivar">@pending_examples</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pending_example</span><span class="ruby-operator">|</span>
72:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{pending_example[0]} (#{pending_example[1]})&quot;</span> 
73:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;  Called from #{pending_example[2]}&quot;</span>
74:             <span class="ruby-keyword kw">end</span>
75:           <span class="ruby-keyword kw">end</span>
76:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
77:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000495" class="method-detail">
        <a name="M000495"></a>

        <div class="method-heading">
          <a href="#M000495" class="method-signature">
          <span class="method-name">dump_summary</span><span class="method-args">(duration, example_count, failure_count, pending_count)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000495-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000495-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 46</span>
46:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_summary</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-identifier">example_count</span>, <span class="ruby-identifier">failure_count</span>, <span class="ruby-identifier">pending_count</span>)
47:           <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dry_run?</span>
48:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
49:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Finished in #{duration} seconds&quot;</span>
50:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
51: 
52:           <span class="ruby-identifier">summary</span> = <span class="ruby-node">&quot;#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}&quot;</span>
53:           <span class="ruby-identifier">summary</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;, #{pending_count} pending&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pending_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>  
54: 
55:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">failure_count</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
56:             <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pending_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
57:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">yellow</span>(<span class="ruby-identifier">summary</span>)
58:             <span class="ruby-keyword kw">else</span>
59:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">green</span>(<span class="ruby-identifier">summary</span>)
60:             <span class="ruby-keyword kw">end</span>
61:           <span class="ruby-keyword kw">else</span>
62:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">red</span>(<span class="ruby-identifier">summary</span>)
63:           <span class="ruby-keyword kw">end</span>
64:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
65:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000492" class="method-detail">
        <a name="M000492"></a>

        <div class="method-heading">
          <a href="#M000492" class="method-signature">
          <span class="method-name">example_pending</span><span class="method-args">(example, message, pending_caller)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000492-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000492-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 24</span>
24:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_pending</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">message</span>, <span class="ruby-identifier">pending_caller</span>)
25:           <span class="ruby-ivar">@pending_examples</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">example</span>.<span class="ruby-identifier">__full_description</span>, <span class="ruby-identifier">message</span>, <span class="ruby-identifier">pending_caller</span>]
26:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000498" class="method-detail">
        <a name="M000498"></a>

        <div class="method-heading">
          <a href="#M000498" class="method-signature">
          <span class="method-name">format_backtrace</span><span class="method-args">(backtrace)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000498-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000498-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 85</span>
85:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_backtrace</span>(<span class="ruby-identifier">backtrace</span>)
86:           <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">nil?</span>
87:           <span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">backtrace_line</span>(<span class="ruby-identifier">line</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
88:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000501" class="method-detail">
        <a name="M000501"></a>

        <div class="method-heading">
          <a href="#M000501" class="method-signature">
          <span class="method-name">backtrace_line</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000501-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000501-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 100</span>
100:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrace_line</span>(<span class="ruby-identifier">line</span>)
101:           <span class="ruby-identifier">line</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\A([^:]+:\d+)$/</span>, <span class="ruby-value str">'\\1:'</span>)
102:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000508" class="method-detail">
        <a name="M000508"></a>

        <div class="method-heading">
          <a href="#M000508" class="method-signature">
          <span class="method-name">blue</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000508-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000508-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 121</span>
121:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blue</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[34m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000502" class="method-detail">
        <a name="M000502"></a>

        <div class="method-heading">
          <a href="#M000502" class="method-signature">
          <span class="method-name">colour</span><span class="method-args">(text, colour_code)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000502-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000502-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 104</span>
104:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">colour_code</span>)
105:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">colour?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">output_to_tty?</span>
106:           <span class="ruby-node">&quot;#{colour_code}#{text}\e[0m&quot;</span>
107:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000499" class="method-detail">
        <a name="M000499"></a>

        <div class="method-heading">
          <a href="#M000499" class="method-signature">
          <span class="method-name">colour?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000499-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000499-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 92</span>
92:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour?</span>
93:           <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">colour</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
94:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000500" class="method-detail">
        <a name="M000500"></a>

        <div class="method-heading">
          <a href="#M000500" class="method-signature">
          <span class="method-name">dry_run?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000500-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000500-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 96</span>
96:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dry_run?</span>
97:           <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">dry_run</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
98:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000504" class="method-detail">
        <a name="M000504"></a>

        <div class="method-heading">
          <a href="#M000504" class="method-signature">
          <span class="method-name">green</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000504-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000504-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 117</span>
117:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">green</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[32m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000506" class="method-detail">
        <a name="M000506"></a>

        <div class="method-heading">
          <a href="#M000506" class="method-signature">
          <span class="method-name">magenta</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000506-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000506-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 119</span>
119:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">magenta</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[35m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000503" class="method-detail">
        <a name="M000503"></a>

        <div class="method-heading">
          <a href="#M000503" class="method-signature">
          <span class="method-name">output_to_tty?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000503-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000503-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 109</span>
109:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output_to_tty?</span>
110:           <span class="ruby-keyword kw">begin</span>
111:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">tty?</span> <span class="ruby-operator">||</span> <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">&quot;AUTOTEST&quot;</span>)
112:           <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NoMethodError</span>
113:             <span class="ruby-keyword kw">false</span>
114:           <span class="ruby-keyword kw">end</span>
115:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000505" class="method-detail">
        <a name="M000505"></a>

        <div class="method-heading">
          <a href="#M000505" class="method-signature">
          <span class="method-name">red</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000505-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000505-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 118</span>
118:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">red</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[31m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000507" class="method-detail">
        <a name="M000507"></a>

        <div class="method-heading">
          <a href="#M000507" class="method-signature">
          <span class="method-name">yellow</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000507-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000507-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 120</span>
120:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">yellow</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[33m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>